/* Copyright (C) 2011. ChengDu Unicon system, All Rights Reserved */

/*""FILE COMMENT""******************************* Technical reference data ****
* File Name	: pwm.h
* Version 	: 1.00
* Device 	: SH72543
* Tool Chain 	: 
* H/W Platform	: 
* Description 	: Timer E control
******************************************************************************/

/******************************************************************************
* History 	: 01.06.2011 Ver. 1.00 First Release
*		: 
*FILE COMMENT END*********************************************************/

#ifndef TIMER_E_H
#define TIMER_E_H
//#include <include.h>
//#include <io7254R.h>

#define MAX_PWM_CHAN  12
#define PWM_BUS_CLOCK 10000000 //Hz


typedef  struct
{
  CPU_INT16U          :16;
  CPU_INT08U channel  :8;
  CPU_INT08U          :7;
  CPU_INT08U pwmStart :1; 
  CPU_INT16U pwmCycle; //Hz
  CPU_INT16U pwmDuty;  //0~10000(0.00%~100.00%)
}st_pwmSet;

extern st_pwmSet pwmSetValue[ MAX_PWM_CHAN ];

void AuxPwmUpdata( const st_pwmSet *const pwmSetValue );
void TimerE_Init( void );

#endif